Posmark Exporter

At work we use Postmark to send emails to customers. One day, during an incident, we wanted to analyze the hard bounces we were having, but Postmark only allows to export 500 records at a time in CSV format.
If we want to export more than 500 records, we must use their API. Instead of creating a script to export this data, I decided to create a Next.js web app that allows to easily export a CSV file with as many records as you want.
Unfortunately, the Postmark API doesn’t allow for requests to be called from the client side, which would be the ideal thing here, so I had to make the web app use the backend to make the requests instead of the user. You provide the Postmark server token and then it’s used to make requests to the Postmark API and retrieve the data in batches. Then it gets compiled to a CSV on the client side.
For security reasons (so you know that I’m not storing the server token anywhere) I made this project open source: https://github.com/afonsocraposo/postmark-exporter.